﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UIT.Controls.Template;
using UIT.Web.Controls.Data;
using System.Windows.Markup;

namespace UIT.Web.Controls.Template
{
    public static class ClientTemplate
    {
        public static void SetRunAt(DataTemplate template, RunAtMode mode)
        {
            template.Metadata = mode;
        }

        public static RunAtMode GetRunAt(this DataTemplate template)
        {
            return ((RunAtMode?)template.Metadata) ?? RunAtMode.Server;
        }
    }
}
